package com.supersit.greensproject.fragment;

import android.content.Context;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RadioGroup;

import com.supersit.greensproject.R;
import com.supersit.greensproject.activity.BaseFragment;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

/**
 * 蔬菜质量检测
 * Created by cong on 2016/7/21.
 */
@ContentView(R.layout.fragment_massdetection_entering_vegetables)
public class MassDetectionEnteringFragmentVegetables extends BaseFragment {
    private Context context;
    @ViewInject(R.id.et_entering_date)
    private EditText etCreateDate;
    @ViewInject(R.id.et_sample_number)
    private EditText etSampleNum;//样品编号
    @ViewInject(R.id.et_sample_product)
    private EditText etProdectName;//产品名称
    @ViewInject(R.id.et_from_base)
    private EditText etFromBase;//来源基地
    @ViewInject(R.id.et_chromium)
    private EditText etCR;//铬含量
    @ViewInject(R.id.et_mercury)
    private EditText etHG;//汞含量
    @ViewInject(R.id.et_arsenic)
    private EditText etAS;//砷含量
    @ViewInject(R.id.et_fluorine)
    private EditText etF;//氟含量
    @ViewInject(R.id.et_lead)
    private EditText etPB;//铅含量
    @ViewInject(R.id.rg_cr_result)
    private RadioGroup rgCR;//铬检测结果
    @ViewInject(R.id.rg_hg_result)
    private RadioGroup rgHG;//汞检测结果
    @ViewInject(R.id.rg_as_result)
    private RadioGroup rgAS;//砷检测结果
    @ViewInject(R.id.rg_f_result)
    private RadioGroup rgF;//氟检测结果
    @ViewInject(R.id.rg_pb_result)
    private RadioGroup rgPB;//铅检测结果
    @ViewInject(R.id.btn_save_result)
    private Button btnSaveResult;
    private int productType;//0蔬菜 1肉鸡 2奶牛 3渔业 4生猪


    @Override
    public void onViewCreated(View view, Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        context = getActivity();
        productType = getActivity().getIntent().getIntExtra("productType", 0);
    }
    private void setTextChanged(EditText view) {
        if (null != view) {
            view.addTextChangedListener(new TextWatcher() {
                @Override
                public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {

                }

                @Override
                public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {

                }

                @Override
                public void afterTextChanged(Editable editable) {

                }
            });
        }
    }
}
